import Cookies from 'js-cookie'

const TokenKey = 'merchant_token'
const UserIdKey = 'merchant_id'
const UserKey = 'merchant_user'
const AccessKey = 'merchant_access'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function removeToken() {
    return Cookies.remove(TokenKey)
}

export function getUserId() {
  return Cookies.get(UserIdKey)
}

export function getUser() {
  return Cookies.get(UserKey)
}

export function setToken(token) {
    return Cookies.set(TokenKey, token)
}

export function setId(id) {
    return Cookies.set(UserIdKey, id)
}

export function setUser(user) {
    return Cookies.set(UserKey, user)
}

export function setAccess(ace) {
    return Cookies.set(AccessKey, ace)
}
